using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using NinjectMVC.Models;

namespace NinjectMVC.Controllers
{
    public class MathController : Controller
    {
        IPiWebService _ws;

        public MathController(IPiWebService ws)
        {
            _ws = ws;
        }

        public ActionResult ComputeCircumference(float radius)
        {
            float pi = _ws.GetPi();
            float circ = 2 * pi * radius;
            ViewData["Circumference"] = circ.ToString();
            return View();
        }
    }
}